﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date, ,>
-- Description:	<Description, ,>
-- =============================================
CREATE FUNCTION ManufacturerFromSchemaXml
(
	-- Add the parameters for the function here
	@schemaXml xml
)
RETURNS varchar(max)
AS
BEGIN
	return @schemaXml.query('/schema/deviceDescription[position()<=1]/*[local-name()="root"]/*[local-name()="device"]/*[local-name()="manufacturer"]').value('.', 'varchar(max)')

END
